package mPackage

/**
 * @Author: Jie
 * @Date: 2019/5/15 10:21
 * @Function :
 */

fun main(args: Array<String>) {
    var output: String
    output = ""
    println(output.length)
   output = null.toString()
    println(output+"  and length "+output.length)


    val abc = abc(2, 3)
    println(abc);
    println("sum of 19 and 23 is ${sum(19, 23)}")
    printSum(11,22)
}

fun abc(a: Int, b: Int): Int {
    return a+b;
}

//将表达式作为函数体、返回值类型自动推断的函数：
fun sum(a:Int,b:Int)=a+b

//Unit 返回类型可以省略：
fun printSum( a :Int ,b: Int){
    println("sum of $a and $b is ${a+b}")
}




